package com.ht.medicaltreatment.bean

/**
 * isExist 0：没有，  1：有    2：借用,  3错误
 * type: 0：没有，  1：有, 自己添加的类型，当扫描uid时，赋值1，然后用这个和isExist做判断，如果isExist == 0或者1
 * 颜色变蓝，如果是2，颜色变黄
 */
class ScallSDKListBean(
    var location:Int,
    var uid :String?,
    var transportRfidSampleId:Int,
    var isExist:Int,
    var type:Int,
    var name:String? = null
){

    override fun equals(other: Any?): Boolean {
        val bean = other as ScallSDKListBean
        /*if(uid == bean.uid){
            bean.isExist = 1
        }*/
        return if(uid != null) uid == bean.uid else bean.uid == null
    }

    override fun hashCode(): Int {
        return if(uid != null) uid.hashCode() else 0
    }
}
